import {createApp} from 'vue'
import {createPinia} from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
//element-ui
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 如果您正在使用CDN引入，请删除下面一行。
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// if you just want to import css
import 'element-plus/theme-chalk/dark/css-vars.css'
import '@share/assets/main.css'
import '@share/assets/user-style.css'
import DynamicWindow from './DynamicWindow.vue'
//element 的icon
const app = createApp(DynamicWindow)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

//内存数据管理
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);

app.use(pinia)
app.use(ElementPlus)
app.mount('#dynamic-app');

//网页启动的时候主动拉取状态

//随后靠ws服务进行数据推送
//所有具体的状态管理靠网页端进行  后台服务只负责推送原始数据




